package com.ys.controller;

import cn.hutool.json.JSONUtil;
import com.ys.entity.WalletDeposit;
import com.ys.entity.WalletWithdraw;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 通知接收测试
 */
@RestController
@Slf4j
@Data
public class NotifyController {

    /**
     * 冲币通知
     * @param walletDeposit
     * @return
     */
    @PostMapping("/notifyWalletDeposit")
    private String notifyWalletDeposit(WalletDeposit walletDeposit){
        log.info("冲币通知参数："+ JSONUtil.toJsonStr(walletDeposit));
        return "success";

    }

    /**
     * 提币通知
     * @param walletWithdraw
     * @return
     */
    @PostMapping("/notifyWalletWithdraw")
    private String notifyWalletWithdraw(WalletWithdraw walletWithdraw){
        log.info("提币通知参数："+ JSONUtil.toJsonStr(walletWithdraw));
        return "success";

    }
}
